<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>boolean 表达式</p><br/>
<p th:text="true">true</p><br/>
<p th:text="false">false</p><br/>
<p th:if="${married}">已婚了，married=true</p><br/>
<p th:if="${age} &lt;18">没有成年</p><br/>
<p th:if="${age} &gt;18">成年</p><br/>
<p th:if="${married} and ${age} &lt;18">未成年，结婚了</p>
</body>
</html>